package Leason3;

import java.util.Scanner;

public class Task6 {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		boolean x = true;
		
		int numbers;
		
		System.out.println("Enter the length of the first array");
		int sizeFir = sc.nextInt();
		int[] firstArr = new int[sizeFir];
				
			System.out.println("Enter the first array elements");
		for(int i = 0; i < firstArr.length; i++)
		{
			System.out.println("Element index "+i+". ");
			numbers = sc.nextInt();
			firstArr[i]=numbers;
		}
		
		
			System.out.println("Enter the lenght of the second array");
		int sizeSec = sc.nextInt();
		int[] secondArr = new int[sizeSec];
		
			System.out.println("Enter the second array elements");
		for(int i = 0; i < secondArr.length; i++)
		{
			System.out.println("Element index "+i+". ");
			numbers = sc.nextInt();
			secondArr[i]=numbers;
		}
		
		for(int i = 0; i < sizeFir; i++)
		{
			if(firstArr[i]!=secondArr[i])
			{
				x = false; break;
			}	
		}
		
		if (x == false)
		{
			System.out.println("The arrays are not equal");
		}
		else 
		{
			System.out.println("The arrays are equal");
		}
		
		if(sizeFir != sizeSec)
		{
			System.out.println("The arrays don't have the same size.");
		}
		else 
		{
			System.out.println("The arrays have the same size.");

		}
		
		
	}

}
